#include <stdio.h>

int main()
{
#if 0
    int count = 5;

    /*循环一定要有退出条件*/
    while(count)
    {
        printf("hello world\n");

        count--;

        if(count == 0)
        {
            /*跳出当前循环*/
            break;
        }
    }
#endif

 #if 0
    int count = 3;

    /*后置++*/
    count++;
    printf("count:%d\n",count);

    /*前置++*/
    ++count;
    printf("count:%d\n",count);

    while (count--)
    {
        printf("hello world\n");
    }
    

#endif

#if 0
    /*前置--：先运算再判断*/
    int count = 3;


    while (--count)
    {
        printf("hello world\n");
    }

#endif
    
#if 1
    /*后置--：先判断再运算*/
    int count = 3;


    while (count--)
    {
        printf("hello world\n");
    }

#endif






    return 0;
}